package cn.iocoder.yudao.module.ai.controller.admin.operationscene.vo;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Schema(description = "分页结果")
@Data
public class ScenePageResult<T>  {

    @Schema(description = "其他统计数据", requiredMode = Schema.RequiredMode.REQUIRED)
    private OperationSceneRespCountVO countInfo ;

    @Schema(description = "数据", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<T> list;

    @Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long total;

    public ScenePageResult() {
    }

    public ScenePageResult(List<T> list, Long total, OperationSceneRespCountVO countInfo) {
        this.list = list;
        this.total = total;
        this.countInfo = countInfo;
    }

    public ScenePageResult(Long total) {
        this.list = new ArrayList<>();
        this.total = total;
    }

    public static <T> ScenePageResult<T> empty() {
        return new ScenePageResult<>(0L);
    }

    public static <T> ScenePageResult<T> empty(Long total) {
        return new ScenePageResult<>(total);
    }
}
